x86: Core support for Intel MCA support
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 20 Mar 2009 17:24:29 +0000 (17:24 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 20 Mar 2009 17:24:29 +0000 (17:24 +0000)
commit32e8dd573b4540e9ba040d713c8b38547971d7a0
treeb7cefba3fd0ab5dc2794dd7ddbaef27799122ae7
parent2ccae6ea67754ae139ce6b25d928e64b479e9865
x86: Core support for Intel MCA support

Those patches based on AMD and SUN's MCA related jobs.
We have latest rebase after SUN's latest improvements.
We will have late following patches for recovery actions. This is a
basic framework for Intel.

Some implementation notes:
1) When error happens, if the error is fatal (pcc = 1) or can't be
recovered (pcc = 0, yet no good recovery methods),
    for avoiding losing logs in DOM0, we will reset machine
    immediately. Most of MCA MSRs are sticky. After reboot,
    MCA polling mechanism will send vIRQ to DOM0 for logging.
2) When MCE# happens, all CPUs enter MCA context. The first CPU who
read&clear the error MSR bank will be this
    MCE# owner. Necessary locks/synchronization will help to judge the
    owner and select most severe error.
3) For convenience, we will select the most offending CPU to do most
of processing&recovery job.
4) MCE# happens, we will do three jobs:
    a. Send vIRQ to DOM0 for logging
    b. Send vMCE# to Impacted Guest (Currently Only inject to impacted
    DOM0)
    c. Guest vMCE MSR virtualization
5) Some further improvement/adds for newer CPUs might be done  later
    a) Connection with recovery actions (cpu/memory online/offline)
    b) More software-recovery identification in severity_scan
    c) More refines and tests for HVM might be done when needed.

This patch Enable basic MCA support For Intel

Signed-off-by: Jiang, Yunhong<yunhong.jiang@intel.com>
Signed-off-by: Ke, Liping <Liping.ke@intel.com>
xen/arch/x86/cpu/mcheck/mce_intel.c
xen/arch/x86/cpu/mcheck/x86_mca.h
xen/arch/x86/domain.c
xen/arch/x86/x86_64/traps.c
xen/include/asm-x86/domain.h
xen/include/asm-x86/softirq.h